Pyenv安装 您所在的位置:网站首页 bin怎么安装 win Pyenv安装

Pyenv安装

2023-10-13 06:35| 来源: 网络整理| 查看: 265

先贴上gitlab地址: https://github.com/pyenv/pyenv-installer

背景: 目前在windows环境上进行python学习,所以又重新在windows环境上试着安装了一下pyenv。

大致步骤与官方文档一致,不过介于官方是英文,再写一份方便自己查阅的,毕竟脑子锈掉了。。。

具体步骤:

pip install pyenv-win --target E:\pyenv\.pyenv #这里目录可以不存在,会自动创建

过程中要求我升级pip,所以又按照提示:

python -m pip install --upgrade pip

然后重新执行一次安装就好了

接下来配置环境变量:(windows命令不是很熟,用的填写编辑的方式。。。)

正常的我的电脑->属性>… 正常的我的电脑-属性... 先是建了个PYENV变量 先是建了个PYENV变量 添加到PATH里 添加到PATH里 cmd界面执行

pyenv

显示版本信息及命令手册,安装完成。

pyenv 1.2.4 Usage: pyenv [] Some useful pyenv commands are: commands List all available pyenv commands duplicate Creates a duplicate python environment local Set or show the local application-specific Python version global Set or show the global Python version shell Set or show the shell-specific Python version install Install a Python version using python-build uninstall Uninstall a specific Python version rehash Rehash pyenv shims (run this after installing executables) version Show the current Python version and its origin versions List all Python versions available to pyenv exec Runs an executable by first preparing PATH so that the selected Python which Display the full path to an executable whence List all Python versions that contain the given executable See `pyenv help ' for information on a specific command. For full documentation, see: https://github.com/pyenv-win/pyenv-win#readme

命令简介: install安装:

pyenv install --list #版本列表 pyenv install 3.8.0 -v #在线安装指定版本:例如3.8.0

版本控制:

pyenv version #显示当前版本 pyenv versions #显示所有可用版本及当前版本 pyenv global 3.8.0 #global为全局设置版本,不建议随意使用 pyenv shell 3.8.0 #shell为当前会话设置版本,关闭失效 pyenv local 3.8.0 #local为当前目录设置版本(递归继承)


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有